<?php
/**
 * 教学计划模型
 * @author LXf
 * @date 2018.8.24
 */

namespace App\Model\Crm;

use App\model\BaseModel;
use DB;

class TeachProgramModel extends BaseModel{
     /***
     *教学计划列表 
     ***/
  const TEACH_PROGRAM = 'teach_program';

  public static function listProgram($orderby="id"){
        
        return DB::table(self::TEACH_PROGRAM)->orderBy($orderby)->get();

    }
    /***
     *添加教学计划 
     ***/
    public static function addProgram($data){
        
        return DB::table(self::TEACH_PROGRAM)->insert($data);

    }
     /***
     *修改教学计划 
     ***/
    public static function updateProgram($where,$data){
        
        return DB::table(self::TEACH_PROGRAM)->where($where)->update($data);

    }
    public static function delProgram($where){
       return DB::table(self::TEACH_PROGRAM)->where($where)->delete();
    }

}